#include <stdio.h>
#include <string.h>
#include <math.h>

#define MAXN    10000
int vis[MAXN];
int prime[MAXN];

/* Sieve of Eratosthenes */
int main()
{
    int n;
    if (scanf("%d", &n) == 1) {
        int i, j, c;
        c = 0;
        memset(vis, 0, sizeof(vis));
        for (i = 2; i < n; i++) {
            if (!vis[i]) {
                prime[c++] = i;
                for (j = i * i; j < n; j += i) {
                    vis[j] = 1;
                }
            }
        }
        for (i = 0; i < c; i++) {
            printf("%d\n", prime[i]);
        }
    }
    return 0;
}
